Method and apparatus for testing hardware interrupt service routines in a microprocessor

ABSTRACT

A read/writable memory formed in the same semiconductor chip as a microprocessor is employed in testing a plurality of hardware interrupt service routines initiated by corresponding devices (and components of devices) during a power-on, self-test(POST) of a computer system. The POST is set in the read-only memory(ROM) of the computer system. The read/writable memory, which is ordinarily inoperative during the POST, is used for storing a diagnostic interrupt vector table, which has a list of interrupt numbers and corresponding addresses of the respective interrupt routines. This table is normally subject to change because each device and each of its components have different interrupt service routines, requiring different addresses for the same interrupt number. The random access memory(RAM) has not yet been tested in the POST, and is not regarded as reliable for the hardware interrupt testing and therefore the read/writable memory is used for such testing.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the utilization of read/writable memory located in a semiconductor chip with a microprocessor which can be read from and written to prior to the completion of a computer system's power-on, self-test program(POST). More particularly, it relates to the use of the read/writable memory for hardware interrupt routine testing.

2. Description of the Related Art

When a computer system is turned on, it typically implements a POST program to verify the functionality of its components. Conventionally, it has been assumed that prior to the verification of a computer system's main random access memory(RAM), no reliable read/writable memory is available to the system other than a component microprocessor's few internal registers. As a result of the perceived lack of reliable read/writable memory, hardware interrupt routines have been difficult to test.

When a failure occurs in the testing of hardware interrupt routines (or any other POST testing), the POST should identify as precisely as possible which component has failed. Precise component failure identification is beneficial because it results in more cost-effective effective and efficient repairs. Illustratively, when using the POST, a failure often can only be isolated to several suspect components. To repair this failure requires either 1) replacing all the suspect components; or 2) conducting additional testing to determine which of the suspect components is faulty and replacing it. The amount of additional testing and/or replacement of components required is dependent upon the number of suspect components. Consequently, more precise tests result in fewer suspect components and more cost-effective and efficient repairs.

To accomplish precise fault identification, the POST should ideally be performed in a "crawl out" sequence, that is, a component must first be tested before it is used to test other components. This methodology yields a chronological hierarchy of testing, starting with the most fundamental components and building through more complex ad dependent ones. A consequence of the "crawl out" sequence is the necessary assumption that the bare minimum components needed to implement the POST, which is stored in read-only memory(ROM), are functional. These components include the microprocessor, the ROM, and the components necessary for the microprocessor to read the ROM.

Reliable read/writable memory is memory whose functionality has been verified pursuant to the "crawl out" sequence. The major and often the only source of read/writable memory available to a computer system is the main RAM. A problem arises in that the main RAM is dependent on many other components, and therefor should be tested late in the "crawl out" sequence. Because the main RAM must be regarded as unreliable until tested, no read/writable memory has been though to be reliable prior to the verification of the main RAM except for the microprocessor's few internal registers.

This lack of reliable read/writable memory has made testing of hardware interrupt routines difficult. Hardware interrupts are the communication pathways between the microprocessor and different hardware devices and components thereof. In a typical personal computer (PC) architecture which may utilize, for example, an Am386 microprocessor, interrupts are handled in the following fashion. A device connects to a chained pair of programmable interrupt controllers(PIC) via one of fifteen interrupt request lines(IRQs). When a device needs servicing, it initiates an interrupt by sending a signal on the appropriate IRQ line. The signal is received by the PIC and converted into an eight bit interrupt number which identifies the IRQ line. The PIC, in turn, is connected to the microprocessor and sends it the eight bit interrupt number. Upon receipt of the interrupt number, the microprocessor 1) stores the information necessary to return to the job from which it is interrupted and 2) converts the interrupt number into an interrupt vector table address for that particular device. The vector table address specifies a location in an interrupt vector table where a physical, interrupt handler address may be found. The interrupt vector table may be located in either the system ROM or RAM, but as described below, RAM is ordinarily preferable.

The computer program located at the physical handler address is the interrupt service routine which is used to service an interrupt. In this manner, the microprocessor has used the interrupt vector table to translate an interrupt number into the physical address of an interrupt service routine.

Many devices are capable of generating a number of different types of interrupts on the same IRQ line. In a diagnostic environment each type of interrupt will require its own interrupt service routine and therefore its own interrupt vector. The result is that the interrupt vector table changes for each different type of interrupt. The interrupt vector table is therefore ordinarily set in RAM where such changes may be readily made. The microprocessor then implements whichever interrupt service routine is located at the physical address it reads from the interrupt vector table. The interrupt service routine services the interrupt and, upon completion, the microprocessor reloads the job information and returns to processing the interrupted job.

In testing the interrupts during POST, a problem arises in that the interrupt vector table may be very large to accommodate the multiplicity of different types of interrupts. The table needs frequent updating and modification. However, as indicated earlier, main RAM cannot be tested early in the POST and therefore cannot be regarded as reliable at that point in POST when interrupt testing is to be done. One non-optimal solution to the problem is to reproduce in ROM all of the different permutations of the interrupt vector tables required by the multiplicity of different types of interrupts. This is an extremely space inefficient solution that could require a large amount of valuable ROM space. Consequently, to perform a proper "crawl out" sequence, testing of the hardware interrupts should be completed before that of the main RAM. As a result, it has been conventionally assumed that no reliable read/writable memory was available to store the interrupt vector table for hardware interrupt testing. Therefore, hardware interrupt testing was not implemented without either relying on the untested main RAM, or using large amounts of ROM to store the interrupt vector table. The technique of using the untested main RAM is unsatisfactory because, if a fault is indicated, it is not discernable as to whether the fault is in the RAM or in the interrupt hardware. The technique of using ROM for storing the interrupt vector table yields a more precise fault identification. However, ROM is not readily modifiable and therefore large amounts of ROM must be used to store the multiple interrupt vector tables required to service multiple component devices.

SUMMARY OF THE INVENTION

This invention overcomes the lack of available RAM prior to the completion of the POST through the novel use of the read/writable memory, that is ordinarily not used until after completion of the POST, for storing the interrupt vector table (among other possible uses). The read/writable memory then provides an alterable table for hardware interrupt testing.

The principle object of this invention is to use the read/writable memory prior to completion of the POST for testing hardware interrupt routines.

This and other objects will be made evident in the detailed description that follows.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a microprocessor and its associated memory.

FIG. 2 is a block diagram of the hardware interrupt communications pathways.

FIG. 3 is a block diagram of the ROM diagnostic interrupt vector table and the master handler.

DETAILED DESCRIPTION OF THE INVENTION

In this preferred embodiment, an Am386 microprocessor is described, but is representative of other microprocessors as well.

FIG. 1 shows microprocessor 10 with internal registers 12 and page mode translation look-aside buffer(TLB) 30. TLB 30 is the pertinent read/writable memory of this invention. Connected to microprocessor 10 via the host bus 16 are bus controller 18 and memory controller 22. ROM 20 connects through bus controller 18 and main RAM connects through memory controller 22.

TLB 30 is cache memory which is ordinarily used as a buffer for quick translation of paging operations (cache memory is a type of RAM and is read/writable). This use is available after conclusion of the POST. TLB 30 is organized as a 4-way set associative 32-entry page table cache. TLB 30 has 20 bit linear addresses indexed to corresponding 20 bit physical addresses. Although TLB 30 cannot be accessed during normal operations, it can be accessed for testing purposes during the POST. The novelty in this invention lies in the accessing of TLB 30 during POST for purposes other than its own testing. In this preferred embodiment, TLB 30 is loaded with interrupt vectors, i.e., addresses of interrupt routines during POST.

FIG. 2 illustrates microprocessor 10 having interrupt descriptor table register(IDTR) 14 which is used for storing an address for pointing to the interrupt vector table in normal operation, and to the diagnostic interrupt vector table 50 (see FIG. 3) in ROM during interrupt routine testing.

Device 42 is shown having functional subcomponents 43-45, each of which may require its own different interrupt routine. Device 42 is shown connected to PIC 32 by way of IRQ line 40. Pic 32 has an output connecting it to microprocessor 10 for transmission of the eight bit interrupt numbers which are converted by microprocessor 10 into vector table addresses.

FIG. 3 shows ROM diagnostic interrupt vector table 50 set in ROM, having addresses 52 entered. Table 50 receives vector table addresses, and is connected to master handler 56, set in the POST, which identifies a coded interrupt number. The output of master handler 56 is applied to TLB 30 to select the appropriate physical handler for performing the interrupt.

MODE OF OPERATION OF THE INVENTION

Referring first to FIG. 2, assume that subcomponent 43 of device 42 is selected for testing. The program that selects subcomponent 43 and initiates an interrupt request is the computer program illustrated in source code in Appendix A. The interrupt signal from subcomponent 43 is sent to PIC 32 over IRQ line 40 (1 of 15 in this preferred embodiment). PIC 32 forms an 8 bit interrupt number representative of the interrupting device--device 42 in this case, but requiring the physical address of the interrupt routine for subcomponent 43 to be appended in the diagnostic interrupt vector table loaded in TLB 30 (FIG. 3). The loading of TLB 30 is done by the program shown in Appendix A and is a preliminary step in the testing of the hardware interrupts. Also, IDTR register 14 is loaded with the address of the ROM diagnostic interrupt vector table 50.

Referring again to FIG. 2, microprocessor 10 receives the 8 bit interrupt number from PIC 32 and translates it into the vector table address. That address enables activation of ROM diagnostic interrupt vector table 50 (FIG. 3). In a normal environment, when microprocessor 10 receives the 8 bit interrupt number, it also stores the information on which it was working in its internal registers. Upon completion of the service routine, the information is retrieved. In the absence of RAM in the diagnostic environment, master handler 56 causes the storing of pertinent information relative to that on which microprocessor 10 had been working when the interrupt occurred. This storage is done in arbitrarily selected general purpose register 11 (FIG. 1). Upon the completion of the interrupt service routine, master handler 56 reads the contents of register 11 to continue the diagnostic routine.

In FIG. 2, it can be seen that the interrupt vector for device 42 is referenced by microprocessor 10 through its IDTR 14. The interrupt vector is sent to master handler 56. The details of master handler 56, set in ROM, is shown in Appendix A. Through master handler 56, the interrupt vector is recognized and referenced to TLB 30 (FIG. 2).

While this invention has been described in specific steps and in specific hardware and software, it is contemplated that those skilled in the art will readily recognize that numerous variations and substitutions may be made to the invention to achieve substantially the same results as achieved in the preferred embodiment. Such variations and substitutions could be to the method steps as well as to the hardware. Therefor, the detailed description is to be clearly understood as being given by way of illustration and example only. The spirit and scope of the present invention is to be limited only by the appended claims.

APPENDIX A

                                      APPENDIX A                                   __________________________________________________________________________              IDEAL                                                                          INCLUDE                                                                              "system.inc"                                                             EXTRN sys.sub.-- init                                                                                  : NEAR                                                 EXTRN reg.sub.-- tests                                                                                : NEAR                                                  EXTRN PIC.sub.-- sanity                                                                              : NEAR                                                   EXTRN timer.sub.-- sanity                                                                          : NEAR                                                     EXTRN RTC.sub.-- sanity                                                                              : NEAR                                                   EXTRN RTC.sub.-- vs.sub.-- timer                                                                   : NEAR                                                     EXTRN RTC.sub.-- int                                                                                    : NEAR                                                EXTRN CMOS.sub.-- test                                                                                : NEAR                                                  EXTRN video.sub.-- tests                                                                            : NEAR                                                    EXTRN EMS.sub.-- tests                                                SEGMENT  DIAGS.sub.-- CODE USE16 PUBLIC `CODE`                                                 ASSUME cs:DIAGS.sub.-- CODE,ds:DIAGS.sub.-- CODE               ; ************************************* driver ***************************     *****************                                                              ; description:                                                                          This is the main test driver for the ELAN emulation                            diagtiostics.                                                         ;               The driver label should be located at DIAGS.sub.-- CODE:0               so that it can                                                        ;               be jumped to from the reset code.                              ;               the driver is an endless loop calling tests from the                    DPOST.sub.-- tbl and                                                  ;               displaying their result status to port 80h. Execution                   terminates only                                                       ;               when an error condition has been detected.                     ;                                                                              ;              The normal test process is as follows:                          ;        1.                                                                               Point to test N in the DPOST.sub.-- tbl.                            ;           Display the test's port 80h ID for 1s.                             ;           Call test N.                                                       ;           Disable INTR and restore  DS to GDTD.sub.-- DIAGS.                 ;           Examine test's status. If undefined it's an error. Use test        ;            status to look up a corresponding port 80h code.                  ;           Display port 80h result status and hold for 1s.                    ;           Increment test pointer (N=N+1) and  wrap if end of test                       list.                                                               ;           Go to step 1.                                                      ;                                                                              ;        The error handling procedure is as follows:                           ;        1.                                                                               Display the failure type code (error, spurious interrupt            ;            or unexpected interrupt) and  hold  1s.                           ;           Display the failure mpdifier code and hold 1s.                     ;                                                                                             ERROR failure type code:  The modifier will                                    ;              be the test subsection indicator                                (SET.sub.-- ERC #)                                                             ;                                                                               UNEXP.sub.-- INT failure type code: The modifier will be                      the                                                                            ;              unexpected iterrupt #, either software                          0-1F, or hardware                                                              ;              20-2F.                                                          ;                                                                               SPUR.sub.-- INT failure type code: The modifier will                          indicate which                                                                 ;              PIC the spurious interrupt arrived at (0                        master, 1 slave).                                               ;        3.                                                                               Display the test ID code and hold for 1s.                           ;           Go to step 1.                                                      ; sys regs:                                                                             dr0  . . . General purpose scratch register.                          ;             . . . Holds system bit flag.                                     ;             . . . IRQ bit flags.                                             ;             . . . TLB stack pionter.                                         ;             . . . Holds test ID code in byte1, failure modifier in                         byte0.                                                           ;                tr6                                                           ;              . . . Used to access TLB interrupt vectors and TLB stack.       ;                                                                              ; history:                                                                       Created.chieve                                                               ; ************************************************************************     ****************                                                                        PUBLIC                                                                               signature                                                                        SIGN.sub.-- LENIC                                                              driver     PUBLIC                                             driver:             al,DIAGS.sub.-- IN.sub.-- 80                                                         ;DIAGS entry code for port 80h.                                          80h.alt                                                                                      ;Announce that diags has been entered.                           over.sub.-- sign                                                                          ;skip signature                                 signature                                                                                     DB                                                                                   "AMD ELAN"                                                SIGN.sub.-- LEN                                                                         = $ - signature                                                       over.sub.-- sign:                                                                       mov   eax,dr1       ;get status register                                                 eax,NOT MASK STAT.sub.-- TSTIX                                                                ;zero test index (AL)                                           dr1,eax                       ;save status register         DPOST.sub.-- loop:                                                                          mov                                                                                  ah,SIZE proctbl                                                                                       ;# of bytes in proctbl                                            structure                                                            ah   mul                            ;AX contains                                         offset into DPOST.sub.-- tbl+bx                                      bx,axmov                                                             mov   cx,[(proctb1 PTR DPOST.sub.-- tbl+bx).proc.sub.-- addr]                                            ;get test procedure addr                             mov       dl,[(proctb1 PTR DPOST.sub.-- tbl+bx).test.sub.--                                                     ;get port 80h ID for cur             ; Display port 80h code at before the test is called. Wait -1s before          calling the                                                                    ; test so that user can see ID code.                                                    SET.sub.-- ID                                                                        dl            ;signal test entry at last possible                        DELAY   DLYSEC                                         ;Wait so                                    user can see test code.                           ; Jump to the test.  Use ROM stack to allow NEAR RETs from tests.                       mov   sp,OFFSET test.sub.-- retptr                                                                 ;Point to ROM stack.                                                 cx    jmp                                       ;Call                                    the test.                                         test.sub.-- retptr:                                                                        DW      OFFSET, test.sub.-- ret                                                                                         ;NEAR return addr.        test.sub.-- ret:                                                                              mov                                                                                cx,GDTD.sub.-- DIAGS                                                                                                ;make sure DS is                                    correct. just in case                                                ds,cxmov                                     ;turkey                                     has screwed it up                                                         cli                                                                                 ;same reason as above                             ; Any unrecognized return code must be treated as a failure. Index into a      tabla of                                                                       ; port 80h status codes in the 6xh range.                                               mov   bx,ERROR      ;Reuult code in si.                                        cmp      ax.0                                         ;SUCCESS?                jb        disp.sub.-- res.sub.-- 80h                                                                                         ;out of bounds                                       (-), so ERROR.                                             cmp      ax,RES80TBL.sub.-- SIZ                                                ja        disp.sub.-- res.sub.-- 80h                                                                                         ;out of bounds                                       (+), so ERROR                                              mov      bx.ax                                       ;return                                       code is OK.                                       ; Display port 80h result code and delay -ls for user to see it.               disp.sub.-- res.sub.-- 80h:                                                             mov   bl,[res.sub.-- 80h.sub.-- tbl+bx]                                                            ;Get port80h result code.                                             bl,ERROR.sub.-- 80                                                              err.sub.-- proc                                                                                                ;If ERROR let                                          err.sub.-- proc handle display                                        al,blov                                                                        80h,alt                                                                      DLYSECDELAY                                                                      eax,Oov                                                                        cr2,eax                ;zero result register                                   eax.dr1                                                                        al  inc                     ;increment test number                             al,NUM.sub.-- DPOST.sub.-- TSTS                                                             ;have we reached the end of the test                              save.sub.-- status;                                                                              ;If not, save test number                                    eax.drl                                                             mov   al,(DPOST.sub.-- repeat - DPOST.sub.-- tbl) / SIZE                             proctbl                ;reset the test number to                save.sub.-- status;                                                                     mov   drl.eax       ;save status register                                                 DPOST.sub.-- loop                                                                                               ;the never-ending                                      loop                                              ; ************************************************************************     ************************                                                       ;  If a test failed, we end up here - loop on failure type code, failure       modifier code                                                                  ; and port 80h test ID.                                                        ; ************************************************************************     ************************                                                                PUBLIC                                                                               err.sub.-- proc                                                 err.sub.-- proc:                                                                                 al,bl                       ;Display failure type                                         code.                                                               80h,al out                                                                   DLYSEC   DELAY                                                                   eax,cr2mov                ;Display failure modifier                                       code.                                                               80h,al out                                                                   DLYSEC   DELAY                                                                   eax,cr2mov                ;Display test ID code.                               al,ah  mov                                                                     80h,al out                                                                   DLYSEC   DELAY                                                                   err.sub.-- proc                                                                                         ;Do it al again.                    ; ************************************************************************     ************************                                                       ; description:                                                                          Software exception handler. INTS 0 - 1Fh. These are treated as                 unexpected                                                            ;                        interrupts indicating catastrophic CPU events.                 These generate a call to                                              ;                        the driver's error handler procedure. The                      UNEXP.sub.-- INT failure code, the                                    ;                        interrupt # and test-in-progress's ID will be                  cyclically displayed to port                                          ;                        80h by the error handler.                             ;                                                                              ; history:                                                                       Created.chieve                                                               ; ************************************************************************     ************************                                                       int.sub.-- 0:                                                                           mov   bx,0                                                                             SW.sub.-- int                                                 int.sub.-- 1:                                                                                   bx,1                                                                           Sw.sub.-- int                                                 int.sub.-- 2:                                                                                   bx,2                                                                           SW.sub.-- int                                                 int.sub.-- 3:                                                                                   bx,3                                                                           SW.sub.-- int                                                 int 4:           bx,4                                                                           SW.sub.-- int                                                 int.sub.-- 5:                                                                                   bx,5                                                                           SW.sub.-- int                                                 int.sub.-- 6:                                                                                   bx,6                                                                           SW.sub.-- int                                                 int 7:           bx,7                                                                           SW.sub.-- int                                                 int.sub.-- 8:                                                                                   bx,8                                                                           SW.sub.-- int                                                 int.sub.-- 9:                                                                                   bx,9                                                                           SW.sub.-- int                                                 int.sub.-- A:                                                                                   bx,0Ah                                                                         SW.sub.-- int                                                 int.sub.-- B:                                                                                   bx,0Bh                                                                         SW.sub.-- int                                                 int.sub.-- C:                                                                                   bx,0Ch                                                                         SW.sub.-- int                                                 int.sub.-- D:                                                                                   bx,0Dh                                                                         SW.sub.-- int                                                 int.sub.-- E:                                                                                   bx,0Eh                                                                         SW.sub.-- ints                                                int.sub.-- F:                                                                                   bx,0Fh                                                                         SW.sub.-- int                                                 int.sub.-- 10:                                                                                  bx,10h                                                                         SW.sub.-- int                                                 int.sub.-- 11:                                                                                  bx,11h                                                                         SW.sub.-- int                                                 int.sub.-- 12:                                                                                  bx,12h                                                                         SW.sub.-- int                                                 int.sub.-- 13:                                                                                  bx.13h                                                                        SW.sub.-- int                                                  int.sub.-- 14:                                                                                  bx,14h                                                                         SW.sub.-- int                                                 int.sub.-- 15:                                                                                  bx,15h                                                                         SW.sub.-- int                                                 int.sub.-- 16:                                                                                  bx,16h                                                                         SW.sub.-- int                                                 int.sub.-- 17:                                                                                  bx,17h                                                                         SW.sub.-- int                                                 int.sub.-- 18:                                                                                  bx,18h                                                                         SW.sub.-- int                                                 int.sub.-- 19:                                                                                  bx,19h                                                                         SW.sub.-- int                                                 int.sub.-- 1A:                                                                                  bx,1Ah                                                                         SW.sub.-- int                                                 int.sub.-- 1B:                                                                                  bx,1Bh                                                                         SW.sub.-- int                                                 int.sub.-- 1C:                                                                                  bx,1Ch                                                                         SW.sub.-- int                                                 int.sub.-- 1D:                                                                                  bx,1Dh                                                                         SW.sub.-- int                                                 int.sub.-- 1E:                                                                                  bx,1Eh                                                                         SW.sub.-- int                                                 int.sub.-- 1F:                                                                                  bx,1Fh                                                        SW.sub.-- int:                                                                                  al,OFFn                                                                        PIC.sub.-- MASTER+1.al                                                                            ;write IMR (PICO) (mask all                                             interrupts)                                       ; Set interrupt number in b0 of CR2.                                                    mov   eax,cr2                                                                  mov     al,bl                        ;Unexpected int # in b0 of                                    cR2                                                        mov     cr2,eax                                                                mov     bl,UNEXP.sub.-- INT.sub.-- 80                                                                     ;Sets error type to UNEXP.sub.--                                        INT.sub.-- 80 (unexpected interrupt)                       jmp     err.sub.-- proc                                               ; ************************************************************************     ************************                                                       ; inputs:                                                                               BP - should have been preset to contain the NEAR return address                within                                                                ;                    a wait loop.                                              ;                                                                              ;                   A table of 16 vectors should be established in the                  TLB al linear                                                         ;                   addresses 20xxxh-2Fxxxh. If an interrupt does not                   require an ISR                                                        ;                   (setting the IRQ flag in DR2 is sufficient) then a                  vector value of                                                       ;                   0 should be installed in the TLB vector table.             ;                                                                              ; description:                                                                          Hardware interrupt handler. INTs 20h-2Fh.                             ;                                                                              ; NOTE:  Interrupts are NOT! NOT! NOT! re-enabled at the end of tje ISR.                This must                                                             ;        be done after returning (jmp bp) to the interrupted routine.          ;                                                                              ; outputs:                                                                              An IRQ flag will be set in DR2 indicating the IRQ that                         occurred.                                                             ;                                                                              ; history:                                                                       Created.chieve                                                               ; ************************************************************************     ************************                                                                PUBLIC                                                                               HWi.sub.-- x                                                    int.sub.-- 20:                                                                          mov   bx,20h                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 22:                                                                          mov   bx,22h                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 23:                                                                          mov   bx,23h                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 24:                                                                          mov   bx,24h                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 25:                                                                          mov   bx,25h                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 26:                                                                          mov   bx,26h                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 27:                                                                          mov   bx,27h                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 28:                                                                          mov   bx,28h                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 29:                                                                          mov   bx,29h                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 2A:                                                                          mov   bx,2Ah                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 2B:                                                                          mov   bx,2Bh                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 2C:                                                                          mov   bx,2Ch                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 2D:                                                                          mov   bx,2Dh                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 2E:                                                                          mov   bx,2Eh                                                                   jmp   HW.sub.-- int                                                   int.sub.-- 2F:                                                                          mov   bx,2Fh                                                          HW.sub.-- int:                                                                                PUSHTLB                                                                        ax                                                                             cx     PUSHTLB                                                                 dx     PUSHTLB                                                                     dx,PIC.sub.-- MASTER                                                          bl,1000b               ;Was the int from master or                                        slave PIC?                                                            chk.sub.-- lv1.sub.-- 7                                                                            ;If master, check for level 7                                       interrupt.                                                           dx,PIC.sub.-- SLAVE                                                                              ;Else it was a slave interrupt.           chk.sub.-- lvl.sub.-- 7:                                                                   mov                                                                                   al,bl                                                                          al,111b                ;Look at interrupt level from                                     FIC.                                                                 al,7mp                    ;Could it be a level 7                                         (spurious).                                                          set.sub.-- IRQ.sub.-- flg                                                                         ;If not, it's  a real int.                                  al,0Bh                  ;OCW3 to enable a read of IS                                     bits.                                                                dx,alt                   ;Send OCW3                                             al,dx                   ;Read IS bits.                                       al,10000000b                                                                                      ;Is level 7 IS bit set?                                      set.sub.-- IRQ.sub.-- flg                                                                         ;If so, it's not spurious.                                  eax,cr2                                                                       bl,1000b               ;Which PIC was the spurious int                                    on?                                                                al   setnz                    ;Set failure modifier for                                    0 (PIC0) or 1 (PIC1).                                               cr2,eaxv                                                                       bl,SPUR.sub.-- INT.sub.-- 80                                                                      ;Sets error type to SPUR.sub.--                                        INT.sub.-- 80 (spurious interr                                      err.sub.-- proc                                              set.sub.-- IRQ.sub.-- flg:                                                                mov    ecx,ebx                   ;Save HW int #                                       ecx,0Fhd                  ;Get IRQ #                                           eax,dr2v                  ;Get IRQ flags.                                      eax,ecxs                                                                       dr2,eaxv                 ;Set IRQ active flag.                               ecx,bx movzx                ;Zap upper WORD of ebx.                              ecx,12hl                  ;Turn INT # into a linear                                       address                                                              cl,lor                     ;Set Command bit.                                  tr6,ecxv                  ;Select linear address for                                      TLB lookup.                                                         ecx,tr7v                  ;Read physical address                                          (really 2o bits of int ve                                          cl.10000bt               ;Is PL bit set (was the lookup                                    a hit)?                                                             TLB.sub.-- hit                                                                                           ;If so, hit.                                         ecx,cr2v                  ;Else, we have no vector in                                     TLB for this IRQ.                                                  cl,bl  mov                   ;Unexpected HW int # in b0                                    of cR2                                                             cr2,ecxmov                                                                     bl,UNEXP.sub.-- INT.sub.-- 80                                                                    ;Sets error type to UNEXP.sub.--                                         INT.sub.-- 80 (unexpected int                                      err.sub.-- proc                                                                                         ;If no vector then haul ass  to                                   error handler.                                    TLB.sub.-- hit:                                                                               shr                                                                              ecx,12                      ;Get INT vector.                                   HWi.sub.-- vect                                                                                          ;If non-NULL jwnp to it.                              al,20hov                                                                     PIC.sub.-- MASTER,al                                                           PIC.sub.-- SLAVE,al                                                                                    ;EOIs.                                                 HWi.sub.-- x                   ;Bail.                          HWi.sub.-- vect:                                                                             jmp                                                                               cz                              ;Jump to the ISR.             HWi.sub.-- x:                                                                                 dxPOPTLB                                                                       cx      POPTLB                                                                 az      POPTLB                                                                   sp,6  add                   ;Restore SP.                                       bp    jmp                       ;Return address in bp         ; ************************************************************************     ************************                                                       ; Port 80h result translation table. Maps test return codes to port 80h        result codes.                                                                  ; ************************************************************************     ************************                                                       res.sub.-- 80h.sub.-- tbl                                                               DB      SUCCESS.sub.-- 80                                                               NA.sub.-- 80                                                                   WRN.sub.-- 80                                                                  ERROR.sub.-- 80                                              RES80TBL.sub.-- SIZ                                                                         =  $ -res.sub.-- 80h.sub.-- tbl                                   ; ------------------------------------------------------------------------     -----------------------------------------------                                ; DPOST (Diagnostic POST) procedure table.                                     ;                                                                              ;              TEST               PORT 80h ID                                  ; ------------------------------------------------------------------------     -----------------------------------------------                                         ALIGN 4                                                               LABEL     DPOST.sub.-- tbl                                                                        BYTE                                                                 <sys.sub.-- init.                                                                             SYS.sub.-- INIT.sub.-- 80>                                                                         ;disable reset button              LABEL    DPOST.sub.-- repeat                                                                      BYTE                                                                 proctbl <reg.sub.-- tests,                                                                    REG 80>                                                                proctbl <PIC.sub.-- sanity,                                                             PIC.sub.-- 1.sub.-- 80>                                               proctbl <timer.sub.-- sanity,                                                            TIMER.sub.-- 1.sub.-- 80>                                            proctbl <RTC.sub.-- sanity,                                                              RTC.sub.-- 1.sub.-- 80>                                              proctbl <RTC.sub.-- vs.sub.-- timer,                                                   RTC.sub.-- VS.sub.-- T.sub.-- 80>                                      proctbl <cmos.sub.-- TEST,                                                                RTC.sub.-- CMOS.sub.-- 80>                                          proctbl <video.sub.-- tests,                                                               VIDEO.sub.-- 80>                                                   proctbl <EMS.sub.-- tests,                                                                EMS.sub.-- 80>                                      ;              proctbl <timerl.sub.-- sanity,                                                          TIMER.sub.-- C.sub.-- 80>                                                                  ;Timer 1 sanity check                      ;              proctbl <RTC.sub.-- sanity,                                                                RTC.sub.-- C.sub.-- 80>                                                                   ;RTC sanity check                        ;              proctbl <RTC.sub.-- vs.sub.-- timer.                                                     R.sub.-- VS.sub.-- T.sub.-- 80>                                                            ;RTC vs. Timer 1 check                    ;              proctbl <RTC.sub.-- test,                                                                    RTC.sub.-- 80>                                                                            ;RTC test                              ;              proctbl <PIC.sub.-- test.sub.-- 1,                                                         PIC.sub.-- 1.sub.-- 80>                                                                   ;PIC test 1                              ;              proctbl <timer.sub.-- test,                                                                TIMER.sub.-- 2.sub.-- 80>                                                               ;Programmable Interval Timer test          ;              proctbl <PIC.sub.-- test.sub.-- 2,                                                         PIC.sub.-- 2.sub.-- 80>                                                                   ;PIC test 2                              ;              proctbl <ram.sub.-- cfg,                                                                      RAM.sub.-- CFG.sub.-- 80>                                                            ;RAM configuration routine                 ;              proctbl <glue.sub.-- testa,                                                                TESTA.sub.-- 80>                                                                         ;RAM tests test                           ;              proctbl <glue.sub.-- dataline,                                                          DATALINE.sub.-- 80>                                                                          ;RAM dataline test                       ;              proctbl <glue.sub.-- burst,                                                                BURST.sub.-- 80>                                                                             ;RAM bursting tests                   ;              proctbl <glue.sub.-- misDWORD,                                                          MISWORD.sub.-- 80>                                                                            ;RAM misaligned transfer tests          ;              proctbl <glue.sub.-- misBURST,                                                          MISBURST.sub.-- 80>                                                                          ;RAM misaligned transfer tests           ;              proctbl <glue.sub.-- page.sub.-- miss,                                                  PAGEMISS.sub.-- 80>                                                                         ;RAM RAS/CAS timing tests                 ;              proctbl <glue.sub.-- chaos,                                                                 CHAOS.sub.-- 80>                                                                           ;RAM chaos test                        ;              proctbl <glue.sub.-- fdc,                                                                     FDC.sub.-- 80>                                                                             ;Floppy controller test              ;              proctbl <fbs.sub.-- pres.sub.-- test,                                                    FBS.sub.-- PRES.sub.-- 80>                                                                 ;Floppy boot sector presence test         ;              proctbl <HDC.sub.-- test,                                                                     HDC.sub.-- 80>                                                                             ;Hard-disk controller test           ;              proctbl <HDbs.sub.-- pres,                                                                   HBS.sub.-- PRES.sub.-- 80>                                                             ;Hard-disk boot sector presence                                             test                                         NUM.sub.-- DPOST.sub.-- TSTS = (S - DPOST.sub.-- tbl) / SIZE proctbl           ; ------------------------------------------------------------------------     -----------------------------------                                            ; ROM Interrupt Descriptor Table                                               ; ------------------------------------------------------------------------     -----------------------------------                                                     PUBLIC                                                                               ROMIDT                                                                   PUBLIC                                                                                ROM.sub.-- IDT.sub.-- SIZE                                     LABEL        ROMIDT                                                                            BYTE                                                                    idesc                                                                              <int.sub.-- 0,GDTC.sub.-- DIAGS,,86h,>                                                                   ;INT 0                                           idesc                                                                                     <int.sub.-- 1,GDTC.sub.-- DIAGS,,86h,>                                                                                     ;INT 1                  idesc                                                                                     <int.sub.-- 2,GDTC.sub.-- DIAGS,,86h,>                                                                                     ;INT 2                  idesc                                                                                     <int.sub.-- 3,GDTC.sub.-- DIAGS,,86h,>                                                                                     ;INT 3                  idesc                                                                                     <int.sub.-- 4,GDTC.sub.-- DIAGS,,86h,>                                                                                     ;INT 4                  idesc                                                                                     <int.sub.-- 5,GDTC.sub.-- DIAGS,,86h,>                                                                                     ;INT 5                  idesc                                                                                     <int.sub.-- 6,GDTC DIAGS,,86h,>                                                                                            ;INT 6                  idesc                                                                                     <int.sub.-- 7,GDTC.sub.-- DIAGS,,86h,>                                                                                     ;INT 7                  idesc                                                                                     <int.sub.-- 8,GDTC.sub.-- DIAGS,,86h,>                                                                                   ;INT 8                    idesc                                                                                     <int.sub.-- 9,GDTC.sub.-- DIZAGS,,86h,>                                                                                 ;INT 9                     idesc                                                                                     <int.sub.-- A,GDTC.sub.-- DIAGS,,86h,>                                                                                   ;INT 0Ah                  idesc                                                                                     <int.sub.-- B,GDTC.sub.-- DIAGS,,86h,>                                                                                   ;INT 0Bh                  idesc                                                                                     <int.sub.-- C,GDTC.sub.-- DIAGS,,86h,>                                                                                   ;INT 0Ch                  idesc                                                                                     <int.sub.-- D,GDTC.sub.-- DIAGS,,86h,>                                                                                   ;INT 0Dh                  idesc                                                                                     <int.sub.-- E,GDTC.sub.-- DIAGS,,86h,>                                                                                   ;INT 0Eh                  idesc                                                                                     <int.sub.-- F.GDTC.sub.-- DIAGS,,86h,>                                                                                   ;INT 0Fh                  idesc                                                                                     <int.sub.-- 10,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 10h                   idesc                                                                                     <int.sub.-- 11,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 11h                   idesc                                                                                     <int.sub.-- 12,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 12h                   idesc                                                                                     <int.sub.-- 13,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 13h                   idesc                                                                                     <int.sub.-- 14,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 14h                   idesc                                                                                     <int.sub.-- 15,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 15h                   idesc                                                                                     <int.sub.-- 16,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 16h                   idesc                                                                                     <int.sub.-- 17,GDTC DIAGS,,86h,>                                                                                        ;INT 17h                   idesc                                                                                     <int.sub.-- 18,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 18h                   idesc                                                                                     <int.sub.-- 19,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 19h                   idesc                                                                                     <int.sub.-- 1A,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 1Ah                   idesc                                                                                     <int.sub.-- 1B,GDTC.sub.-- DIAGS,,86h,>                                                                                 ;INT 1Bh                   idesc                                                                                     <int.sub.-- 1C,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 1Ch                                        idesc                                                                                     <int.sub.-- 1D,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 1Dh                                        idesc                                                                                     <int.sub.-- 1E,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 1Eh                                        idesc                                                                                     <int.sub.-- 1F,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 1Fh                                        idesc                                                                                     <int.sub.-- 20,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 20h (IRQ0)                                 idesc                                                                                     <int.sub.-- 21,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 21h (IRQ1)                                 idesc                                                                                     <,GDTC.sub.-- DIAGS,,6h,>                                                                          ;INT 22h (Not present)                          idesc                                                                                     <int.sub.-- 23,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 23h (IRQ3)                                 idesc                                                                                     <int.sub.-- 24,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 24h (IRQ4)                                 idesc                                                                                     <int.sub.-- 25,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 25h (IRQ5)                                 idesc                                                                                     <int.sub.-- 26,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 26h (IRQ6)                                 idesc                                                                                     <int.sub.-- 27,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 27h (IRQ7)                                 idesc                                                                                     <int.sub.-- 28,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 28h (IRQ8)                                 idesc                                                                                     <int.sub.-- 29,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 29h (IRQ9)                                 idesc                                                                                     <int.sub.-- 2A,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 2Ah (IRQ10)                                idesc                                                                                     <int.sub.-- 2B,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 2Bh (IRQ11)                                idesc                                                                                     <int.sub.-- 2C,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 2Ch (IRQ12)                                idesc                                                                                     <int.sub.-- 2D,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 2Dh (IRQ13)                                idesc                                                                                     <int.sub.-- 2E,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 2Eh (IRQ14)                                idesc                                                                                     <int.sub.-- 2F,GDTC.sub.-- DIAGS,,86h,>                                                            ;INT 2Fh (IRQ15)                       ROM.sub.-- IDT.sub.-- SIZE = S-ROMIDT-1                                        ; ------------------------------------------------------------------------     -----------------------------------                                            ; ROM IDT pointer operend for LIDT instruction.                                ; ------------------------------------------------------------------------     -----------------------------------                                                     PUBLIC                                                                               rom.sub.-- idt.sub.-- ptr                                       LABEL          rom.sub.-- idt.sub.-- ptr FWORD                                          DW    ROM.sub.-- IDT SIZE                                                                               ;idt limit                                            DW         OFFSET ROMIDT                                                                                    ;low WORD of idt addr                             DW         00fEh                     ;hi WORD of idt addr             ENDS                                                                           END                                                                            __________________________________________________________________________ 

I claim:
 1. A system for testing a plurality of hardware interrupt service routines for a microprocessor prior to the completion of a power-on, self-test (POST) program for the microprocessor, set in a read-only memory (ROM) of the microprocessor, the system incorporating a read/writable memory formed in the same semiconductor chip as the microprocessor and ordinarily inoperative during the POST, the system comprising:(a) a diagnostic interrupt vector table set in the read/writable memory, the table comprising a plurality of interrupt vectors corresponding to a plurality of hardware interrupt routines, and a physical address for each of the interrupt vectors corresponding to the address of a diagnostic interrupt service routine for that interrupt vector; (b) means for selecting one of a plurality of devices and for causing the selected device to initiate an interrupt signal; (c) circuitry for transmitting the interrupt signal to the microprocessor for recognition and storage of the interrupt signal; (d) means for accessing the read/writable memory for the interrupt signal and reading out the corresponding physical address; and (e) means for performing the diagnostic interrupt service routine.
 2. The system of claim 1 wherein the circuitry for transmitting the interrupt signal to the microprocessor comprises:(c)(i)a plurality of interrupt request lines, each line associated with one of the plurality of devices; and (ii)an interrupt controller connected to the plurality of interrupt request lines for converting the interrupt signal from the selected device on the corresponding interrupt request line to an interrupt number.
 3. The system of claim 2 wherein the means for accessing the read/writable memory comprises:(d)(i) a ROM diagnostic interrupt vector table inserted into the POST, having a list of interrupt vectors corresponding to the interrupt numbers and an output responsive to selection of the interrupt vector of the selected device, represented as a coded interrupt number; (ii) a master handler inserted into the POST, connected to respond to the output of the ROM diagnostic interrupt vector table by recognizing the coded interrupt number and applying the coded interrupt number to the diagnostic interrupt vector table set in the read/writable memory.
 4. The system of claim 3 wherein the means for performing the diagnostic interrupt service routine is a program set into the POST.
 5. The system of claim 4 wherein the means for assessing the read/writable memory further comprises:(d)(iii) an interrupt descriptor table register for entering the address of the ROM diagnostic interrupt vector table by the microprocessor.
 6. The system of claim 1 wherein the means for performing the diagnostic interrupt service routine is a program set into the POST.
 7. A method of using a read/writable memory, formed on a semiconductor chip with a microprocessor, prior to the completion of a power-on, self-test(POST) program set in the read-only memory (ROM) of the microprocessor to test a plurality of hardware interrupts, initiated by a plurality of corresponding devices and components of devices, of the microprocessor, comprising the steps of:(a)loading the read/writable memory with a plurality of interrupt vectors corresponding to the plurality of interrupts, and a physical address for each of the vectors corresponding to the address of a diagnostic interrupt service routine: (b)causing a selected device of the plurality of corresponding devices to initiate an interrupt signal; (c)generating the interrupt vector from the microprocessor in response to reception of the interrupt signal; (d)accessing the read/writable memory; (e)reading out the physical address in the read/writable memory at the interrupt vector; and (f)performing the diagnostic interrupt service routine at the physical address.
 8. The method of claim 7 wherein the step of accessing the read/writable memory comprises the steps of:(d)(i)inserting a ROM diagnostic interrupt vector table comprising a list of the interrupt vectors into the POST; and (ii)inserting a master handler into the POST.
 9. The method of claim 8 wherein the step of accessing the read/writable memory further comprises the steps of:(d)(iii)reading the interrupt vector in the ROM diagnostic interrupt vector table and jumping to the master handler; (iv)recognizing the coded interrupt number by the master handler for reading from the diagnostic interrupt vector table.
 10. The method of claim 9 wherein the step of performing the diagnostic service routine at the physical address comprises the additional step of:(f)(i)inserting a table of diagnostic interrupt service routines into the POST, each routine having a unique physical address.
 11. The method of claim 10 further comprising the steps of:providing the microprocessor with the address of the ROM diagnostic interrupt vector table; storing the information being worked on by the microprocessor in a general purpose register when the interrupt signal is received; and having the microprocessor point to the address of the ROM diagnostic interrupt vector table.
 12. The method of claim 11 further comprising the final step of retrieving the stored information on which the microprocessor may continue to work. 